﻿/***********************************************************************
 * <copyright file="IAdminBaseController.cs" company="B/S JSC">
 * -->    Copyright (C) statement. All right reserved
 * </copyright>
 * 
 * Created:   Hoang Bich Son 
 * Email:    sonhb@newman.vn
 * Website:
 * Create Date: Thursday, March 6, 2014
 * Usage: 
 * 
 * RevisionHistory: 
 * Date         Author               Description 
 * 
 * ************************************************************************/

using System.Web.Mvc;

namespace DXWebApplication.Areas.Administrators.Controllers
{
    /// <summary>
    /// IAdminBaseController interface
    /// </summary>
    /// <typeparam name="T"></typeparam>
    public interface IAdminBaseController<in T> : IController
    {
        /// <summary>
        /// Inserts this instance.
        /// </summary>
        /// <returns></returns>
        PartialViewResult Insert();

        /// <summary>
        /// Inserts the specified model.
        /// </summary>
        /// <param name="model">The model.</param>
        /// <returns></returns>
        JsonResult Insert(T model);

        /// <summary>
        /// Updates the specified action.
        /// </summary>
        /// <param name="idJson">The identifier json.</param>
        /// <returns></returns>
        PartialViewResult Update(string idJson);

        /// <summary>
        /// Updates the specified model.
        /// </summary>
        /// <param name="model">The model.</param>
        /// <returns></returns>
        JsonResult Update(T model);

        /// <summary>
        /// Deletes the specified model.
        /// </summary>
        /// <param name="idJson">The identifier json.</param>
        /// <returns></returns>
        JsonResult Delete(string idJson);

        /// <summary>
        /// Gets the paged.
        /// </summary>
        /// <param name="currentPage">The current page.</param>
        /// <returns></returns>               
        PartialViewResult GetPaged(int currentPage = 1);        
    }
}
